﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ThanhTu.GNC.Media.KQXS.DataAccess.DAL;
using ThanhTu.GNC.Media.KQXS.DataAccess.DO;
using System.Data;

namespace ThanhTu.GNC.Media.KQXS.DataAccess.BL
{
    public class ProvinceBL : IDisposable
    {
        private ProvinceDAL vProvinceDAL = null;
        private bool disposed = false;
        public ProvinceBL()
        {
            if (vProvinceDAL == null)
            {
                vProvinceDAL = new ProvinceDAL();
            }
        }
        ~ProvinceBL() { Dispose(false); }

        #region IDisposable Members

        public void Dispose()
        {
            Dispose(true);
            GC.SuppressFinalize(this);
        }

        private void Dispose(bool disposing)
        {
            if (!disposed)
            {
                if (disposing)
                {
                    if (vProvinceDAL != null)
                    {
                        vProvinceDAL.Dispose();
                        vProvinceDAL = null;
                    }
                }

                disposed = true;
            }
        }

        #endregion

        public int SaveProvince(ProvinceDO vProvinceDO) { return vProvinceDAL.SaveProvince(vProvinceDO); }
        public int delete(string ID_Province) { return vProvinceDAL.delete(ID_Province); }
        public ProvinceDO getbyProvince(string ID_Province) { return vProvinceDAL.getbyProvince(ID_Province); }
        public List<ProvinceDO> selectadd() { return vProvinceDAL.selectadd(); }
        public List<ProvinceDO> selectadd_IdRegion(string Id_Region) { return vProvinceDAL.selectadd_idvung(Id_Region); }
        public DataTable SelectAll_page(int pageIndex, int pageSize, ref int rowCount) { return vProvinceDAL.SelectAll_page(pageIndex, pageSize, ref  rowCount); }
        public DataTable SelectAll_page_idvung(string id_Region, int pageIndex, int pageSize, ref int rowCount) { return vProvinceDAL.SelectAll_page_idvung(id_Region, pageIndex, pageSize, ref  rowCount); }
    }
}
